package com.action.gulimall.coupen.controller;

import com.action.common.utils.R;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName TestController
 * @Deacription TODO
 * @Author sl
 * @Date 2021/6/10/010 15:39
 * @Version 1.0
 **/
@RefreshScope
@RestController
@RequestMapping("test")
public class TestController {

    //测试nacos config
    @Value("${test}")
    String test;

    @RequestMapping("/config")
    public R testNacosConfig(String str){
        return R.ok("testNacosConfig").put("test", test).put("str",str);
    }

    @RequestMapping("/fegin")
    public R testOpenFegin(String str){
        return R.ok("testOpenFegin").put("str",str);
    }
}
